import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class FindGroup {
    public static void main(String[] args) {
        String str ="我想买一本java书，尽快联系我13265052220" +
                "交朋友，电话是13286993017" +
                "出售二手电脑，电话是15365940003";
        Matcher m = Pattern.compile("((13\\d)|(15\\d))\\d{8}")
                .matcher(str);
        while (m.find())
            System.out.println(m.group());
    }
}
